<template>
    <CommonModal v-model="state.addRoleVisible"
        :closable="true"
        :width="600"
        @handleOk="addRoleOk"
        @handleCancel="addRoleCancel"
        :title="state.addRoleTitle">
        <div class="modal-h1">
            充电费率列表
        </div>
    </CommonModal>
</template>


<script setup>
import { reactive, ref, onMounted, watch, onActivated, onDeactivated,defineExpose } from 'vue';
import { message } from "ant-design-vue";
import { useRoute, useRouter } from 'vue-router';

const formRef = ref();
const route = useRoute();
const router = useRouter();
let state = reactive({
    addFlag: 1, // 1 新增 2 修改
    addRoleVisible: false,  // 新增/编辑 显隐
    addRoleTitle: '',

    newOrEdit: 'new',
    tableData: [],
   
})
// 新增编辑数据
const defaultFormState = {
    id: null,
    name: '',  //场站名称
}
let formState = reactive({
    ...defaultFormState
})
const rules = {

};



onMounted(() => {

})


const addRoleOk = () => {
}
const addRoleCancel = () => {
}
// 保存
const saveFn = () => {
    polyEditor.close();
    formRef.value.validateFields().then(r => {
       
    })
}
const showModal = (flag, record) => {
    state.addRoleVisible = true
    state.addFlag = flag;

}


defineExpose({ showModal })

</script>


<style scoped lang='less'>

</style>
